package com.xuejiujiu.controller;

import com.xuejiujiu.Mapper.AllMapper;
import com.xuejiujiu.pojo.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
public class AllController {

    @Autowired
    private AllMapper allMapper;

    @GetMapping("/data1")
    @CrossOrigin
    public List<detail_hau_1> detail_hau_1(){
        return allMapper.detail_hau_1();
    }

    @GetMapping("/data2")
    @CrossOrigin
    public List<BuonceRate> buonce_rateAll(){
        return allMapper.buonce_rateAll();
    }

    @GetMapping("/data3")
    @CrossOrigin
    public List<ConsoildateRetentionRate> consoildate_retention_rate(){
        return allMapper.consoildate_retention_rateAll();
    }

    @GetMapping("/data4")
    @CrossOrigin
    public List<FivedayRetenitionRate> fiveday_retenition_rate(){
        return allMapper.fiveday_retenition_rate();
    }

    @GetMapping("/data5")
    @CrossOrigin
    public List<NextdayRetenitionRate> nextday_retenition_rate(){
        return allMapper.nextday_retenition_rate();
    }

    @GetMapping("/data6")
    @CrossOrigin
    public List<OverallStatistics> overall_statistics(){
        return allMapper.overall_statistics();
    }

    @GetMapping("/data7")
    @CrossOrigin
    public List<Repurchase_rate> repurchase_rate(){
        return allMapper.repurchase_rate();
    }

    @GetMapping("/data8")
    @CrossOrigin
    public List<rfm_usertype> rfm_usertype(){
        return allMapper.rfm_usertype();
    }

    @GetMapping("/data9")
    @CrossOrigin
    public List<severnday_retenition_rate> severnday_retenition_rate(){
        return allMapper.severnday_retenition_rate();
    }

    @GetMapping("/data10")
    @CrossOrigin
    public List<statistics_four_behaviors_of_users> statistics_four_behaviors_of_users(){
        return allMapper.statistics_four_behaviors_of_users();
    }

    @GetMapping("/data11")
    @CrossOrigin
    public List<the_most_repeat_purchases> the_most_repeat_purchases(){
        return allMapper.the_most_repeat_purchases();
    }

    @GetMapping("/data12")
    @CrossOrigin
    public List<the_number_of_purchases_person> the_number_of_purchases_person(){
        return allMapper.the_number_of_purchases_person();
    }

    @GetMapping("/data13")
    @CrossOrigin
    public List<threeday_retenition_rate> threeday_retenition_rate(){
        return allMapper.threeday_retenition_rate();
    }

    @GetMapping("/data14")
    @CrossOrigin
    public List<type_of_product_purchased_the_most_repeatedly> type_of_product_purchased_the_most_repeatedly(){
        return allMapper.type_of_product_purchased_the_most_repeatedly();
    }

    @GetMapping("/data15")
    @CrossOrigin
    public List<UserAddEvery> searchAll(){
        return allMapper.searchAll();
    }

    @GetMapping("/data16")
    @CrossOrigin
    public List<user_behaviors_change_hour> user_behaviors_change_hour(){
        return allMapper.user_behaviors_change_hour();
    }

    @GetMapping("/data17")
    @CrossOrigin
    public List<user_rank> user_rank(){
        return allMapper.user_rank();
    }

    @GetMapping("/data18")
    @CrossOrigin
    public List<user_recenvy_frequency> user_recenvy_frequency(){
        return allMapper.user_recenvy_frequency();
    }

    @GetMapping("/data19")
    @CrossOrigin
    public List<user_score> user_score(){
        return allMapper.user_score();
    }

    @GetMapping("/data20")
    @CrossOrigin
    public List<users_with_most_repeat_purchases> users_with_most_repeat_purchases(){
        return allMapper.users_with_most_repeat_purchases();
    }
}